Recalculate Process
Use the Recalculate API process to recalculate data in a project file.
Process Settings
Below are the settings you must define for the Recalculate API process.
| Setting | Description | Sample Value |
|---|---|---|
| ProcessID | This setting informs Cobra to run the Recalculate process. | Recalc |
| Project | This setting refers to the project where you want to run the recalculate process. The project name is case-sensitive. This setting is required. | Demo Advanced |
| ClassList | This setting contains the list of cost classes to recalculate. This setting is required. | Budget,OTB |
| Criteria | Use this setting to specify the selection criterion you want to use for the Recalc process. The selection criteria change based on the project. Use one of the values for this setting:
The options are case- sensitive. This setting is optional and the default value is Total Project. | Control Account |
| IncludeChildren | Use this setting to determine whether the process should run against the parent code and its children.
This setting is optional and the default value is 0. | 1 |
| Selection | Use this setting to specify the portion of the project to recalculate. The available choices depend on the selections you made in the Criteria settings. If you specify Total Project in the Criteria setting, the Selection setting will be left blank. This setting is optional and has no default value. | 1.1 |
| Scope | Use one of the following values:
| DateRange |
| StartDateLabel | Use this setting if you use Scope=DateRange. This setting refers to a valid calendar label in calendar set 00 and is the starting date for the DateRange option the calculation process is to execute. This setting is required only if the Scope=All setting is not defined or missing from the API script. | JAN07 |
| EndDateLabel | Use this setting if you use Scope=DateRange. This setting refers to a valid calendar label in calendar set 00 and is the end date for the DateRange option the calculation process is to execute. This setting is required only if the Scope=All setting is not defined or missing from the API script. | APR07 |
| ResultList | This setting is the result used to recalculate the total and available costs. This is a required parameter and must be specified. This setting is case- sensitive. | OVERHEAD,GANDA |
| AllowComplete | Use this setting to indicate whether or not you want to recalculate completed control accounts and work packages. This setting is optional and the default value is the value set in the Allow recalculation of completed Control Accounts and Work Packages option on the Recalc Preferences tab of the Project Properties dialog box. | 1 |
| AllowReadOnlyClasses | Use this setting to indicate whether or not to recalculate read-only classes. This setting is optional and the default value is the value set in the Allow Recalc on classes not editable in the time-phase grid option on the Recalc Preferences tab of the Project Properties dialog box. | 1 |
| ReplaceResults | This setting determines whether Cobra uses a rate of 1 or 0 when performing calculations and a required rate is not found. If ReplaceResults = 1 (True), Cobra uses a rate of 1 when there is a missing rate. If ReplaceResults = 0 (False), Cobra uses a rate of 0 when there is a missing rate. If this setting is not specified, Cobra uses a rate of 0 when there is a missing rate. | 1 |
Sample Script
Below is a sample script file for the Recalculate API process.
[Process001]
ProcessID=Recalc
Project=Demo Advanced
Criteria=Control Account
IncludeChildren=0
Selection=1.1
Scope=All
StartDateLabel=JAN07
EndDateLabel=APR07
ClassList=Budget,OTB
ResultList= OVERHEAD,GANDA
AllowComplete=0
AllowReadOnlyClasses=0
ReplaceResults=1